<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Face</title>
</head>
<body>
<h1>face index</h1>
<div id="result"></div>

<script>
    // 初始化.参数为url
    var sse = new EventSource("post")
    sse.onmessage = function (e) {
        console.log("data: ",e.data, e);
        document.getElementById("result").innerText=e.data
        // 关闭自动重连
        /*if(e.data === 'flux data--3'){
            sse.close();
        }*/
    }
</script>
</body>
</html>